	<div class="Main_Right" >
		<div class="Main_Right_Top"><span></span></div>
		<div class="Main_Right_Content" id="Main_Right_Content">
			  <div class="Main_Right_Title">当前位置：学校管理 --> 专业管理 --> 编辑专业  </div>
              <!-- Main_information begin -->
			  <div class="Main_handleBar check_pass" id="Main_handleBar" style="display: none"   >
					<div class="Main_handleBar_head"></div>
					<div class="Main_handleBar_body">
						<p></p>
					</div>
			  </div>
			  <form name="thisForm"  id="thisForm" method="post" action="${base}/majors/edit.action" >
				<input type=hidden name="major.id" id="id" value=${major.id}>
				<input type=hidden name=isAdmin value=>
			   <div class="Main_Right_ListTable">
					<div class="Main_Right_SearchTable_Title">
						<span class="Main_Right_SearchTable_Title_Left"></span>
						基本信息
						<span class="Main_Right_SearchTable_Title_Right"></span>
					</div>
					<div class="Main_Right_p"  style="padding-left:10px">
						<table border="0" cellspacing="0" cellpadding="0"  width="100%" class="newTable">
							<tr>
								<td class="title"  width="8%">所属专业专业类型：</td>
								<td class="content"  width="14%">
								    <@baseMacro.majortypeSelect "majortype" "major.majortype.id" majortypeList?if_exists major.majortype.id />
								</td>			
								<td class="title"  width="8%">专业名称：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="majorName" name="major.majorName" value="${(major.majorName)?if_exists}"/>
								</td>
								<td></td>
								<td></td>
							</tr>			
							<tr>
								<td class="title"  width="8%">学制：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="majorTerms" name="major.majorTerms" value="${(major.majorTerms)?if_exists}"/>
								</td>			
								<td class="title"  width="8%">学费范围：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="tuitionRange" name="major.tuitionRange" value="${(major.tuitionRange)?if_exists}"/>
								</td>
								<td></td>
								<td></td>
							</tr>			
							<tr>
								<td class="title"  width="8%">专业领域：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="majorFields" name="major.majorFields" value="${(major.majorFields)?if_exists}"/>
								</td>			
								<td class="title"  width="8%">入学时间：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="enrollmentTime" name="major.enrollmentTime" value="${(major.enrollmentTime)?if_exists}"/>
								</td>
								<td></td>
								<td></td>
							</tr>			
							<tr>
								<td class="title"  width="8%">专业描述：</td>
								<td class="content"  width="14%" colspan='3'>
								    <textarea id='majorDescription' name='school.majorDescription' rows='6' cols='82'>${(major.majorDescription)?if_exists}</textarea>
								</td>			
								<td></td>
								<td></td>
							</tr>			
						</table>
					</div>
		  			<div class="Main_Right_SearchTable_Bottom2"  style="text-align:center;">
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="toSubmit();"  >保存</span>
						</div>
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="goBack('${base}/majors/list.action')" >返回</span>
						</div>
		 			 </div>
			    </div>
				</form>
		 </div>
	 </div>
	 <script> 
jQuery(document).ready(function($){
		$("table").find("td").removeClass("title");
		$("table").find("td").removeClass("content1");
		$("table").find("th").addClass("nui-table-cell");
		$("table").find("td").addClass("nui-table-cell2");
		$("table").find("input").attr("size","25");
	 	$( "#enrollmentTime" ).datepicker();
		$( "#enrollmentTime" ).datepicker( "option", "dateFormat",'yy-mm-dd' );	
});		
function toSubmit(){
		 var form=document.getElementById("thisForm");
	     if(jQuery("#thisForm").valid()){
            $("#thisForm").ajaxSubmit({  
                    type: 'post',  
                    url: "${base}/majors/edit.action" ,  
                    success: function(data){  
                        loadNewContent('${base}/majors/list.action');
                    },  
                    error: function(XmlHttpRequest, textStatus, errorThrown){  
                        alert( "error");  
                    }  
            }); 
		}
}  
//表单验证
jQuery(document).ready(function() {
		var validator = jQuery("#thisForm").validate({
			errorElement: "em",    //单个错误信息显示的包含元素
			errorPlacement: function(error, element) {
			    if(error!=null && error!=""){
					error.appendTo( element.parent("td") );  //找到父元素td的下一个td元素(即在该元素父元素td的下一个td元素中添加错误信息)
				}
			},
			rules: {  
				'major.majortype.id': { 
					required:true
				},
				'major.majorName': { 
					required:true,  
					maxlength:250
				}
			},
			messages: { 
				'major.majortype.id': {
					required: '必填'
				},
				'major.majorName': {
					required: '必填',
					maxlength: '最多输入250个字符'
				}
			}
		});
	});
</script>